package cosw.com.shanghaica;

import android.content.Context;
import android.content.Intent;
import android.os.Bundle;
import android.support.v7.app.ActionBarActivity;
import android.widget.Button;
import butterknife.BindView;
import butterknife.ButterKnife;
import butterknife.OnClick;
import com.cosw.sdkShanghaiCA.SHCAProvider;

public class DeviceManageActivity extends ActionBarActivity {

  @BindView(R.id.btn_show_container)
  Button btnShowContainer;
  @BindView(R.id.btn_create_container)
  Button btnCreateContainer;
  @BindView(R.id.btn_reset_pin)
  Button btnResetPwd;
  @BindView(R.id.btn_show_device_info)
  Button btnShowDeviceInfo;

  private SHCAProvider provider;

  private Context mContext;

  @Override
  protected void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    setContentView(R.layout.activity_device_manage);
    ButterKnife.bind(this);

    mContext = this;

    provider = SHCAProvider.getInstance(this.getApplication());
    provider.setEnv(mContext);
  }


  @OnClick(R.id.btn_show_container)
  public void onBtnShowContainerClicked() {
    Intent intent = new Intent(this, ContainerListActivity.class);
    startActivity(intent);
  }

  @OnClick(R.id.btn_create_container)
  public void onBtnCreateContainerClicked() {
    Intent intent = new Intent(this, CreateContainerActivity.class);
    startActivity(intent);
  }

  @OnClick(R.id.btn_reset_pin)
  public void onBtnResetPwdClicked() {
    Intent intent = new Intent(this, ResetPinActivity.class);
    startActivity(intent);
  }

  @OnClick(R.id.btn_show_device_info)
  public void onBtnShowDeviceInfoClicked() {
    Intent intent = new Intent(this, DeviceInfoActivity.class);
    startActivity(intent);
  }
}
